In the case of measuring a performance of a computer or a program, a trace method and a profiler method have been know as a method for investigating bottle necks in a computer or a program.
In the trace system, trace statements (a kind of print statements) are embedded before and after an interval in the program that the user wants to measure (hereinafter, measurement interval). By execution of the trace statement, executed times are obtained and a time lag of the execution time of each of the trace statement is calculated.
In the profiler method, an event interrupt is periodically generated during execution of the program. By the interruption, a value of a program counter at the point is obtained, and a ratio of the value of the program counter included in the measurement interval is calculated.
Note that a technique has been proposed in which an interruption is generated for every one order in a firmware that evaluates a performance of the program, the execution state of the order is simulated by the firmware, and performance information is collected.
Further, a technique has been proposed in which a transaction which should be processed is selected and state information is stored during when the transaction is processed by a function unit.
Further, a technique has been proposed in which order addresses for starting and finishing of measurement are set, and an execution time of the program is measured by integrating the vale obtained by subtracting an index time from the execution time for every one order of the interval.
Above techniques are disclosed in Japanese Laid-open Patent Publication No. 1-145736, Japanese Laid-open Patent Publication No. 11-272519, and Japanese Patent No. 3389745.